using System;
using System.Reflection;


namespace Framework
{
    public static class TypeExtension
    {
        public static PropertyInfo GetPropertyRecursion(this Type type, string name)
        {
            PropertyInfo info = null;
            while(info == null && type != null)
            {
                info = type.GetProperty(name);
                type = type.BaseType;
            }
            return info;
        }
    }
}

